﻿<%@ Page Title="" Language="C#" MasterPageFile="~/pages/Main.Master" AutoEventWireup="true"
    CodeBehind="Movies.aspx.cs" Inherits="Organizer.pages.Movies" %>

<%@ Register Assembly="JotaControls" Namespace="JotaControls" TagPrefix="jcc" %>
<%@ Register Src="../controls/FeedbackMsg.ascx" TagName="FeedbackMsg" TagPrefix="uc2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table class="tables">
        <tr>
            <td>
                <asp:Label ID="lblName" runat="server" Text="Name:"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="txtName" runat="server"></asp:TextBox>
            </td>
            <td>
                <asp:Label ID="lblViewedDate" runat="server" Text="Viewed Date:"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="txtViewedDate" runat="server" Width="80px"></asp:TextBox>
                <ajaxToolkit:CalendarExtender ID="cextViewDate" runat="server" Format="dd/MM/yyyy"
                    TargetControlID="txtViewedDate" PopupPosition="Right">
                </ajaxToolkit:CalendarExtender>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblType" runat="server" Text="Type:"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="txtType" runat="server"></asp:TextBox>
            </td>
            <td>
                <asp:Label ID="lblScore" runat="server" Text="Score:"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="txtScore" runat="server" Width="50px"></asp:TextBox>
                <ajaxToolkit:FilteredTextBoxExtender ID="ftextScore" runat="server" FilterType="Custom, Numbers"
                    ValidChars="." TargetControlID="txtScore">
                </ajaxToolkit:FilteredTextBoxExtender>
            </td>
        </tr>
        <tr>
            <td>
            </td>
            <td>
                <%--  <asp:LinkButton ID="lnkSave" runat="server" CausesValidation="false" CssClass="LinkButtonStyle"
                    OnClick="lnkSave_Click">               
               <img src="../images/accept.png" alt="" />               
               Save</asp:LinkButton>
                &nbsp;<asp:LinkButton ID="lnkCancel" runat="server" CausesValidation="false" CssClass="LinkButtonStyle"
                    OnClick="lnkCancel_Click">               
               <img src="../images/bin.png" alt="" />               
               Cancel</asp:LinkButton>--%>
                <jcc:CustomButton ID="btnSave" runat="server" ButtonClass="Positive" ButtonText="Save"
                    OnClick="btnSave_Click" />
                <jcc:CustomButton ID="btnCancel" runat="server" ButtonClass="Negative" ButtonText="Cancel"
                    OnClick="btnCancel_Click" />
            </td>
            <td>
            </td>
            <td>
            </td>
        </tr>
    </table>
    <br />
    <div>
        <asp:GridView ID="grdMovies" runat="server" CssClass="GridViewStyle" RowStyle-CssClass="RowStyle"
            SelectedRowStyle-CssClass="SelectedRowStyle" PagerStyle-CssClass="PagerStyle"
            AlternatingRowStyle-CssClass="AltRowStyle" HeaderStyle-CssClass="HeaderStyle"
            Width="100%" AutoGenerateColumns="False" PageSize="6" AllowPaging="True" OnRowCommand="grdMovies_RowCommand"
            OnPageIndexChanging="grdMovies_PageIndexChanging">
            <AlternatingRowStyle CssClass="AltRowStyle"></AlternatingRowStyle>
            <Columns>
                <asp:BoundField HeaderText="MovieId" DataField="MovieId" Visible="false" />
                <asp:BoundField HeaderText="Name" DataField="Name" />
                <asp:BoundField HeaderText="Type" DataField="Type" />
                <asp:BoundField HeaderText="ViewedDate" DataField="ViewedDate" DataFormatString="{0:d}" />
                <asp:BoundField HeaderText="Score" DataField="Score" />
                <asp:TemplateField>
                    <ItemTemplate>
                        <asp:LinkButton ID="lnkEdit" CssClass="LinkButtonStyle" CausesValidation="false"
                            runat="server" CommandArgument='<%# Eval("MovieId") %>' CommandName="Editar">               
               <img src="../images/pencil.png" alt="" />               
                        </asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <ItemTemplate>
                        <asp:LinkButton ID="lnkDel" CssClass="LinkButtonStyle" CausesValidation="false" runat="server"
                            CommandArgument='<%# Eval("MovieId") %>' CommandName="Apagar">               
               <img src="../images/delete.png" alt="" />               
                        </asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <HeaderStyle CssClass="HeaderStyle"></HeaderStyle>
            <PagerStyle CssClass="PagerStyle"></PagerStyle>
            <RowStyle CssClass="RowStyle"></RowStyle>
            <SelectedRowStyle CssClass="SelectedRowStyle"></SelectedRowStyle>
        </asp:GridView>
    </div>
    <asp:HiddenField ID="hfMovieId" runat="server" Value="0" />
</asp:Content>
